#ifndef CONTACTSQLMODEL_H
#define CONTACTSQLMODEL_H

#include <QObject>
#include <QSqlTableModel>

static const int EmailAdress = Qt::UserRole+1;
static const int NumberAdress = Qt::UserRole+2;
static const int XMPPAdress = Qt::UserRole+2;
static const int ID = Qt::UserRole+3;

class ContactSqlModel : public QSqlTableModel
{
    Q_OBJECT

public:
    ContactSqlModel(QObject *parent = 0);

    QVariant data(const QModelIndex &index, int role) const;
    QString getEmailAdress(const QModelIndex &item) const;
    bool hasPhone(const QModelIndex &index) const;
    bool hasMessenger(const QModelIndex &index) const;
};

#endif // CONTACTSQLMODEL_H
